<form [formGroup]="data4Login" (ngSubmit)="submitForm()">
  <div>
    <label>name</label>
    <input type="text" id="name" formControlName="name" placeholder="name" required>
  </div>
  <div>
    <label>password</label>
    <input type="password" id="password" formControlName="password" placeholder="password" required>
  </div>
  <div>
    <label>role</label>
    <select formControlName="roleId">
      <option value="0" selected>Please Select</option>
      @for (role of roleinfo; track role.id) {
        <option value="{{role.id}}">{{ role.value }}</option>
      }
    </select>
    @if (data4Login.controls.roleId.value == 0) {
      请选择一个登录角色
    }
  </div>
  <button type="submit" [disabled]="!data4Login.valid || data4Login.controls.roleId.value == 0">Login</button>
</form>
{{responseBody}}<br>
{{responseHeader}}
